<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title>审核验收</title>
    <%@ include file="/WEB-INF/views/include/head.jsp"%>
    <script src="${ctxStatic}/js/jquery-1.9.1.min.js"></script>
    <script src="${ctxStatic}/js/DateTimePicker.js"></script>
    <script src="${ctxStatic}/js/layer.js"></script>
    <script src="${ctxStatic}/js/style.js"></script>
    <script src="${ctxStatic}/layDate/laydate.js"></script>
    <link rel="stylesheet" href="${ctxStatic}/css/common.css">
    <link rel="stylesheet" href="${ctxStatic}/css/layerSm.css">
    
    
    <style type="text/css">
    .tab-shr{width: 100px;}
    .tab-shjg{width: 100px;}
    .tab-shyj{width: 500px;}
    .tab-shrq{width: 140px;}
    
    
    </style>
    <script>
    function save() {    	
    	//获取 iframe 数量 
    	var frLength = window.parent.frames.length;
    	//父画面下标 
    	var parentIndex = frLength-2;
    	var params=$("#inputForm").serialize();
    	$.post("${ctx}/quotation/message/checkSave",params, function(result) {
    		window.parent.frames[0].searchListForm();
			window.parent.frames[parentIndex].close();
			closeWin();
		}, 'json');
	}
    
    </script>
</head>
<body>
<form id="inputForm">
<div id="createHead" class="layerHeader clearfix">	   
     <p class="headerTitle">审核验收</p>	
    <div class="headerButton clearfix">
        <button type="button" onclick="save()">确定</button>
        <button type="button" onclick="closeWin()">取消</button>
    </div>
</div>

<div id="showHtml" class="tabBoxSm" >
    <div class="tabSm smOrderBox">              
         <p class="title" style="margin-top:0;margin-bottom:5px;">审核验收履历</p>        
         <div class="tableArea">
        	<div class=" tableScrollSm" style="height: 300px">        
        		<table cellpadding="0" class="tableHead">
                    <thead>
                    <tr>
                    	<th class="tab-shr">审核人</th>
                        <th class="tab-shjg">审核结果</th>
                        <th class="tab-shyj">审核意见</th>
                        <th class="tab-shrq">审核日期</th>
                    </tr>
                    </thead>
                </table>
                <table cellpadding="0" class="tableBody">
                    <tbody>
                    <c:forEach items="${quotation.quotationCheckList }" var="checkList">
                    <tr>
                    	<td class="tab-shr">${checkList.createBy.firstName}</td>
                        <td class="tab-shjg"><c:if test="${checkList.auditResult==1}">通过</c:if><c:if test="${checkList.auditResult==0}">不通过</c:if></td>
                        <td class="tab-shyj">${checkList.auditAdvice}</td>
                        <td class="tab-shrq"><fmt:formatDate value="${checkList.auditDate }" pattern="yyyy-MM-dd HH:mm" /></td>
                    </tr>
                   </c:forEach>
                    </tbody>
                </table>
            </div>
        </div>
        <p class="title">本次审核意见</p>
        <div class="clearfix">
        	<div class="col-66">
                 <p class="tit">报价单（${quotation.offerNO }）需要审核</p>	
                 <input type="hidden" id="id" name="id" value="${quotation.id}">
                 <input type="hidden" id="offerNO" name="offerNO" value="${quotation.offerNO}">
                 <input type="hidden" id="createDate" name="createDate" value="${fns:getDate('yyyy-MM-dd HH:mm')}">
                 <div class="items clearfix">        
                    <div class="col-50 clearfix">
                        <p class="tit">审核结果：</p>
                        <div class="labelBox">
                                    <label>
                                        <input type="radio" style="width:20px;" id="yes" name="auditResult" value="1">通过
                                       </label>
                                       <label>
                                        <input type="radio" style="width:20px;" id="no" name="auditResult" value="0" >拒绝                                       
                                   		</label>
                                   		</div>
                    </div>
                    
                </div>
                <div class="items clearfix" style="margin-bottom:0;">     
                    <p class="tit">审核备注：</p>
                    <textarea id="auditAdvice" name="auditAdvice" style="width:448px;height: 60px"></textarea>&emsp;&emsp;&emsp;&emsp;&emsp;（拒绝时请输入拒绝原因）
                    
                </div>
            </div>
        </div>       
	</div>
</div>
</form>
<script>
</script>
</body>
</html>
